package com.wutuo.roster.provider.constant;


import cn.apestar.core.base.BaseEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * 托管类型
 *
 * @author lvh
 * @version 版本号：V1.0
 */
public enum AppEnum implements BaseEnum {
    /**
     * PARENT
     */
    PARENT("parent", "parent"),

    /**
     * ORG
     */
    ORG("org", "org");

    private Object code;

    private String name;

    AppEnum(Object code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override public String getValue() {

        // TODO Auto-generated method stub
        return code.toString();
    }

    @Override public String getName() {

        // TODO Auto-generated method stub
        return name;
    }

    /**
     * 返回该对象的MAP
     *
     * @return MAP集合
     */
    @Override public Map getMap() {

        Map m = new HashMap();
        m.put("type_id", code);
        m.put("type_name", name);
        return m;
    }

}